package com.example.multiviewontabdemoc9;

import android.os.Bundle;
import android.app.Activity;
import android.app.ActionBar.Tab;
import android.view.Menu;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class MainActivity extends Activity {
	
	


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		
		//xay dung tab host
		
		TabHost tabHost=(TabHost)findViewById(R.id.tabhost);
		
		tabHost.setup();
		
		
		
		
		//dinh nghia cac tab
		//tab1
		
		TabSpec tab1=tabHost.newTabSpec("tag1");
		
		
		
		tab1.setIndicator("Ablbum",getResources().getDrawable(R.drawable.ic_launcher));
		tab1.setContent(R.id.tab1);
		
TabSpec tab2=tabHost.newTabSpec("tag2");
		
		
		
		tab2.setIndicator("Ablbum222",getResources().getDrawable(R.drawable.ic_launcher));
		tab2.setContent(R.id.tab2);
		
	
	tabHost.addTab(tab1);
	tabHost.addTab(tab2);
	
	}

	

}
